package com.party.service.study;

import com.party.common.Page;
import com.party.model.Curriculum;
import com.party.model.Curriculum2Content;
import com.party.model.User2Curriculum;

import java.util.List;

/**
 * Created by 011926 on 2014/10/18.
 */
public interface User2curriculumService {
    public int add(Integer uid,Curriculum curriculum);
    public int delete(Integer id);
    public int deleteAllByCurrId(Integer id);
    public int deleteAllByUid(Integer id);
    public int update(User2Curriculum obj);

    /**
     * 获得所有的 有效的和无效的
     * @param obj
     * @return
     */
    public List<User2Curriculum> getAll(User2Curriculum obj);
    //获得有效的 spare1=0
    public List<User2Curriculum> getFail(User2Curriculum obj);
    //获得有效的 spare1=1
    public List<User2Curriculum> getEffect(User2Curriculum obj);
    /**
     * 更新用户uid的课程信息
     * @param uid
     * @param curriculumList
     */
    public boolean update(Integer uid, List<Curriculum> curriculumList);

    public User2Curriculum get(Integer uid, Integer curriculumId);

    public  Page getList(User2Curriculum user2curriculum, int pageSize, int pageIndex);
}
